From 69909c22cfc79512653d7afe7955fcf81997f09c Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 14 Sep 2009 14:25:14 +0000 Subject: [PATCH] 1. configure.in changed to put a version/time on makelinuxdist.sh.in just like the other platforms. 2. app.pro to remove references to makeextras.mak which was just an experimental thing. 3. data field enable/disable management for split distance. 4. cover script for linux "gpsbabelfe" rewritten from scratch. Old one from googleearth had problems and useless stuff anyway. It wouldn't work with multiple link and blank spaces within directory, and its PATH search was totall unnecessary for Linux. 5. help.cpp tidied up. 6. track title entry field widened in the UI. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3796 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/configure.in | 2 +- gpsbabel/gui/app.pro | 7 +- gpsbabel/gui/filterwidgets.cpp | 10 +- gpsbabel/gui/gpsbabelfe | 77 +++++++-------- gpsbabel/gui/help.cpp | 4 +- gpsbabel/gui/help.h | 4 +- gpsbabel/gui/makeextras.mak | 99 ------------------- .../{makelinuxdist.sh => makelinuxdist.sh.in} | 14 ++- gpsbabel/gui/trackui.ui | 6 +- 9 files changed, 61 insertions(+), 162 deletions(-) delete mode 100644 gpsbabel/gui/makeextras.mak rename gpsbabel/gui/{makelinuxdist.sh => makelinuxdist.sh.in} (83%) diff --git a/gpsbabel/configure.in b/gpsbabel/configure.in index dd1bd897c..b87476f17 100644 --- a/gpsbabel/configure.in +++ b/gpsbabel/configure.in @@ -415,6 +415,6 @@ if test "$ac_cv_valistisarray" = true ; then else AC_MSG_RESULT(no) fi -AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty]) +AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss gui/makelinuxdist.sh xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty]) AC_OUTPUT diff --git a/gpsbabel/gui/app.pro b/gpsbabel/gui/app.pro index 68f01f315..661191879 100755 --- a/gpsbabel/gui/app.pro +++ b/gpsbabel/gui/app.pro @@ -1,4 +1,4 @@ -# $Id: app.pro,v 1.10 2009-09-08 16:06:32 robertl Exp $ +# $Id: app.pro,v 1.11 2009-09-14 14:25:14 robertl Exp $ # CONFIG += qt release @@ -29,11 +29,6 @@ mac:TARGET=GPSBabelFE win32:TARGET=GPSBabelFE unix:TARGET=gpsbabelfe-bin -extras.commands = (make -f makeextras.mak) -extras.target = extras -QMAKE_EXTRA_TARGETS += extras -#POST_TARGETDEPS=extras - FORMS += mainwinui.ui FORMS += advui.ui FORMS += aboutui.ui diff --git a/gpsbabel/gui/filterwidgets.cpp b/gpsbabel/gui/filterwidgets.cpp index eb88dc852..f5deceeea 100644 --- a/gpsbabel/gui/filterwidgets.cpp +++ b/gpsbabel/gui/filterwidgets.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: filterwidgets.cpp,v 1.3 2009-08-28 17:08:55 robertl Exp $ +// $Id: filterwidgets.cpp,v 1.4 2009-09-14 14:25:14 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -85,11 +85,13 @@ void TrackWidget::OtherCheckX() { ui.TZCheck->setEnabled(ui.stopCheck->isChecked() || ui.startCheck->isChecked()); ui.splitCheck->setEnabled(ui.mergeCheck->isChecked() || ui.packCheck->isChecked()); - bool bb = ui.packCheck->isChecked() &&ui.splitCheck->isChecked(); + bool bb = ui.packCheck->isChecked() && ui.splitCheck->isChecked(); ui.splitTimeSpin->setEnabled(bb); ui.splitTimeCombo->setEnabled(bb); - //ui.splitDistSpin->setEnabled(bb); - //ui.splitDistCombo->setEnabled(bb); + + bb = ui.packCheck->isChecked(); + ui.splitDistSpin->setEnabled(bb); + ui.splitDistCombo->setEnabled(bb); } //------------------------------------------------------------------------ diff --git a/gpsbabel/gui/gpsbabelfe b/gpsbabel/gui/gpsbabelfe index e05eb8447..273fde322 100644 --- a/gpsbabel/gui/gpsbabelfe +++ b/gpsbabel/gui/gpsbabelfe @@ -1,55 +1,46 @@ #!/bin/sh +# $Id: gpsbabelfe,v 1.2 2009-09-14 14:25:14 robertl Exp $ +# Copyright (C) 2009 S. Khai Mong . # -# gpsbabelfe startup script, Adpated from googleearth startup +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 +# USA # -# Function to find the real directory a program resides in. -# Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software -FindPath() -{ - fullpath="`echo $1 | grep /`" - if [ "$fullpath" = "" ]; then - oIFS="$IFS" - IFS=: - for path in $PATH - do if [ -x "$path/$1" ]; then - if [ "$path" = "" ]; then - path="." - fi - fullpath="$path/$1" - break - fi - done - IFS="$oIFS" - fi - if [ "$fullpath" = "" ]; then - fullpath="$1" - fi - # Is the sed/ls magic portable? - if [ -L "$fullpath" ]; then - #fullpath="`ls -l "$fullpath" | awk '{print $11}'`" - fullpath=`ls -l "$fullpath" |sed -e 's/.* -> //' |sed -e 's/\*//'` - fi - dirname $fullpath +FollowSymLinks() +{ + fullpath="$1" + while [ -L "$fullpath" ]; do + pathdir=`dirname "$fullpath"` + linktarget=`/bin/ls -l "$fullpath" | sed -e 's/.* -> //'` + d1=`dirname "$linktarget"` + linkdir=`cd "$pathdir" && cd "$d1" && pwd` + linkfile=`basename "$linktarget"` + fullpath=$linkdir/$linkfile + done + echo $fullpath } - -THIS_PATH="`FindPath $0`" -echo $THIS_PATH - - -LD_LIBRARY_PATH=.:${THIS_PATH}:${LD_LIBRARY_PATH} +finalpath=`FollowSymLinks "$0"` +LD_LIBRARY_PATH=`dirname "$finalpath"`:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH -# Let's boogie! -if [ -x "${THIS_PATH}/gpsbabelfe-bin" ] -then - cd "${THIS_PATH}/" - exec "./gpsbabelfe-bin" "$@" +if [ -x "${finalpath}-bin" ]; then + #ldd "${finalpath}-bin" + exec "${finalpath}-bin" "$@" fi -echo "Couldn't run GPSBabelFE (gpsbabelfe-bin). Cannot find it." +echo "Couldn't find/run gpsbabelfe-bin. Possible installation issues" exit 1 - - diff --git a/gpsbabel/gui/help.cpp b/gpsbabel/gui/help.cpp index ae631e5f7..ccd1579d6 100644 --- a/gpsbabel/gui/help.cpp +++ b/gpsbabel/gui/help.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: help.cpp,v 1.6 2009-09-08 16:06:32 robertl Exp $ +// $Id: help.cpp,v 1.7 2009-09-14 14:25:14 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -32,6 +32,8 @@ void ShowHelp(const char *name) QString urlname("file:///" + QApplication::applicationDirPath() + "/help/" + name); #ifdef XXXX + // This has window modality problems. Unless the problem is solved, just use + // the native browser. QWebView *view = new QWebView(); view->setWindowTitle("GPSBabel Help"); view->load(urlname); diff --git a/gpsbabel/gui/help.h b/gpsbabel/gui/help.h index 70386543e..def17d51d 100644 --- a/gpsbabel/gui/help.h +++ b/gpsbabel/gui/help.h @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: help.h,v 1.2 2009-07-20 01:38:40 robertl Exp $ +// $Id: help.h,v 1.3 2009-09-14 14:25:14 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -23,6 +23,8 @@ #ifndef HELP_H #define HELP_H #include + extern void ShowHelp(const char *name); + #endif diff --git a/gpsbabel/gui/makeextras.mak b/gpsbabel/gui/makeextras.mak deleted file mode 100644 index eeebe82cc..000000000 --- a/gpsbabel/gui/makeextras.mak +++ /dev/null @@ -1,99 +0,0 @@ -# -*- Makefile -*- -# $Id: makeextras.mak,v 1.2 2009-09-02 19:05:27 robertl Exp $ -# -# Some make targets and scripts that I find hard to do in the -# Qt qmake system. -# - - -COPY=cp - -XLATE=\ -objects/translations/gpsbabelfe_de.ts \ -objects/translations/gpsbabelfe_fr.ts \ -objects/translations/gpsbabelfe_es.ts \ -objects/translations/gpsbabelfe_hu.ts \ -objects/translations/gpsbabelfe_it.ts \ -objects/translations/gpsbabelfe_de.qm \ -objects/translations/gpsbabelfe_fr.qm \ -objects/translations/gpsbabelfe_es.qm \ -objects/translations/gpsbabelfe_hu.qm \ -objects/translations/gpsbabelfe_it.qm \ -objects/translations/gpsbabel_de.ts \ -objects/translations/gpsbabel_fr.ts \ -objects/translations/gpsbabel_es.ts \ -objects/translations/gpsbabel_hu.ts \ -objects/translations/gpsbabel_it.ts \ -objects/translations/gpsbabel_de.qm \ -objects/translations/gpsbabel_fr.qm \ -objects/translations/gpsbabel_es.qm \ -objects/translations/gpsbabel_hu.qm \ -objects/translations/gpsbabel_it.qm - -EXTRAS=\ -objects/showUrl.sh \ -objects/qt.conf \ -objects/gpsbabelfe \ - -EXTERNS=\ -objects/gpsbabel \ -objects/help/gpsbabel.html \ -objects/libQtCore.so.4 \ -objects/libQtGui.so.4 \ -objects/libQtCore.so.4.4.3 \ -objects/libQtGui.so.4.4.3 \ - - -all: $(EXTRAS) $(XLATE) #$(EXTERNS) - -objects/translations: - mkdir -p objects/translations - -$(XLATE): objects/translations - -objects/showUrl.sh: showUrl.sh - $(COPY) $< $@ - -objects/qt.conf: qt.conf - $(COPY) $< $@ -objects/gpsbabelfe: gpsbabelfe - $(COPY) $< $@ - -babelts: - ./babelstrings.pl >foo.h && \ - lupdate foo.h -ts gpsbabel_de.ts -ts gpsbabel_fr.ts -ts gpsbabel-es.ts -ts gpsbabel_hu.ts \ - -ts gpsbabel_it.ts - -babelfets: - lupdate app.pro - -objects/translations/gpsbabel_de.ts: gpsbabel_de.ts - $(COPY) $< $@ -objects/translations/gpsbabel_fr.ts: gpsbabel_fr.ts - $(COPY) $< $@ -objects/translations/gpsbabel_es.ts: gpsbabel_es.ts - $(COPY) $< $@ -objects/translations/gpsbabel_hu.ts: gpsbabel_hu.ts - $(COPY) $< $@ -objects/translations/gpsbabel_it.ts: gpsbabel_it.ts - $(COPY) $< $@ -objects/translations/gpsbabelfe_de.ts: gpsbabelfe_de.ts - $(COPY) $< $@ -objects/translations/gpsbabelfe_fr.ts: gpsbabelfe_fr.ts - $(COPY) $< $@ -objects/translations/gpsbabelfe_es.ts: gpsbabelfe_es.ts - $(COPY) $< $@ -objects/translations/gpsbabelfe_hu.ts: gpsbabelfe_hu.ts - $(COPY) $< $@ -objects/translations/gpsbabelfe_it.ts: gpsbabelfe_it.ts - $(COPY) $< $@ - -$(EXTERNS): - (cd externs && tar cf - .) | (cd objects && tar xvf -) - -%.qm: %.ts - lrelease $< -qm $@ - -clean: - rm -f $(EXTRAS) - diff --git a/gpsbabel/gui/makelinuxdist.sh b/gpsbabel/gui/makelinuxdist.sh.in similarity index 83% rename from gpsbabel/gui/makelinuxdist.sh rename to gpsbabel/gui/makelinuxdist.sh.in index 6ac85fc36..e41c26a5d 100644 --- a/gpsbabel/gui/makelinuxdist.sh +++ b/gpsbabel/gui/makelinuxdist.sh.in @@ -1,12 +1,15 @@ #!/bin/sh +set -e -v QTLIBDIR=/usr/lib QTSHDIR=/usr/share/qt4 -DISTDIR=gpsbabel-1.3.7Beta +DISTNAME=GPSBabel@PACKAGE_VERSION@@PACKAGE_RELEASE@ +DISTDIR=$DISTNAME rm -rf $DISTDIR mkdir $DISTDIR mkdir $DISTDIR/plugins mkdir $DISTDIR/translations +mkdir $DISTDIR/help cp `ldd objects/gpsbabelfe-bin | grep libQtCore |awk '{print $3}'` $DISTDIR cp `ldd objects/gpsbabelfe-bin | grep libQtGui |awk '{print $3}'` $DISTDIR @@ -15,6 +18,7 @@ cp `ldd objects/gpsbabelfe-bin | grep libQtXml |awk '{print $3}'` $DISTDIR cp `ldd objects/gpsbabelfe-bin | grep libQtNetwork |awk '{print $3}'` $DISTDIR cp `ldd objects/gpsbabelfe-bin | grep libQtDBus |awk '{print $3}'` $DISTDIR cp `ldd objects/gpsbabelfe-bin | grep libphonon |awk '{print $3}'` $DISTDIR +cp `ldd objects/gpsbabelfe-bin | grep libaudio |awk '{print $3}'` $DISTDIR cp -r $QTSHDIR/plugins/imageformats $DISTDIR/plugins cp $QTSHDIR/translations/qt_*.qm $DISTDIR/translations/ @@ -48,10 +52,12 @@ cp qt.conf $DISTDIR/ cp ../gpsbabel $DISTDIR/ # # Help needs to be donea +cp ../../babelweb/htmldoc-development/* $DISTDIR/help/ + cp COPYING $DISTDIR/ -cp AUTHORS $DISTDIR/ -cp README.contrib $DISTDIR/ -cp README.gui $DISTDIR/ +#cp AUTHORS $DISTDIR/ +#cp README.contrib $DISTDIR/ +#cp README.gui $DISTDIR/ rm -f $DISTDIR.tar $DISTDIR.tar.bz2 diff --git a/gpsbabel/gui/trackui.ui b/gpsbabel/gui/trackui.ui index 3c4f20e96..91bf9ef88 100644 --- a/gpsbabel/gui/trackui.ui +++ b/gpsbabel/gui/trackui.ui @@ -6,8 +6,8 @@ 0 0 - 558 - 218 + 544 + 219 @@ -51,7 +51,7 @@ If this value contains a percent (%) character, it is treated as a format string - + the title of the new track is composed of the start time of the track appended to this value. -- 2.30.2